/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package com.fzhucc.modules.sciCxResult.domain;

import com.fzhucc.base.BaseEntity;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author yyg
* @date 2024-01-10
**/
@Entity
@Data
@Table(name="tb_sci_cx_result")
public class SciCxResult extends BaseEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "`studio_id`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "工作室id")
    private Integer studioId;

    @Column(name = "`sb_unit`")
    @ApiModelProperty(value = "申报单位")
    private String sbUnit;

    @Column(name = "`name`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "成果名称")
    private String name;

    @Column(name = "`type`")
    @ApiModelProperty(value = "成果类别")
    private String type;

    @Column(name = "`studio_name`")
    @ApiModelProperty(value = "所属工作室名称")
    private String studioName;

    @Column(name = "`studio_year`")
    @ApiModelProperty(value = "获得市级工作室年份")
    private String studioYear;

    @Column(name = "`studio_leader_name`")
    @ApiModelProperty(value = "工作室领衔人名称")
    private String studioLeaderName;

    @Column(name = "`studio_leader_honor`")
    @ApiModelProperty(value = "领衔人最高荣誉")
    private String studioLeaderHonor;

    @Column(name = "`sb_name`")
    @ApiModelProperty(value = "申报联系人姓名")
    private String sbName;

    @Column(name = "`sb_ways`")
    @ApiModelProperty(value = "申报联系人联系方式")
    private String sbWays;

    @Column(name = "`zl_type`")
    @ApiModelProperty(value = "专利形式")
    private String zlType;

    @Column(name = "`zl_status`")
    @ApiModelProperty(value = "专利状况")
    private String zlStatus;

    @Column(name = "`zl_time`")
    @ApiModelProperty(value = "专利批准时间")
    private String zlTime;

    @Column(name = "`ss_ways`")
    @ApiModelProperty(value = "成果实施方式")
    private String ssWays;

    @Column(name = "`pro_input`")
    @ApiModelProperty(value = "项目投入资金情况")
    private String proInput;

    @Column(name = "`annual_output`")
    @ApiModelProperty(value = "年产值")
    private String annualOutput;

    @Column(name = "`profit`")
    @ApiModelProperty(value = "利润")
    private String profit;

    @Column(name = "`first_name`")
    @ApiModelProperty(value = "第一完成人姓名")
    private String firstName;

    @Column(name = "`first_sex`")
    @ApiModelProperty(value = "第一完成人性别")
    private String firstSex;

    @Column(name = "`first_post`")
    @ApiModelProperty(value = "第一完成人职务")
    private String firstPost;

    @Column(name = "`first_title`")
    @ApiModelProperty(value = "第一完成人职称")
    private String firstTitle;

    @Column(name = "`first_unit`")
    @ApiModelProperty(value = "第一完成人工作单位")
    private String firstUnit;

    @Column(name = "`first_way`")
    @ApiModelProperty(value = "第一完成人联系电话")
    private String firstWay;

    @Column(name = "`details`")
    @ApiModelProperty(value = "简介")
    private String details;

    @Column(name = "`pic`")
    @ApiModelProperty(value = "成果图图片")
    private String pic;

    @Column(name = "`is_delete`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "是否删除 默认否")
    private Integer isDelete;

    @Column(name = "`org_area`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "地区组织机构区分  字典 zqx_org_area")
    private String orgArea;

    @Column(name = "`audit_status`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "区审核状态 默认未审核  zqx_audit_status")
    private String auditStatus;

    @Column(name = "`is_show`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "是否小程序展示")
    private Integer isShow;

    @Column(name = "`sort`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @Column(name = "`user_id`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "填报用户")
    private Long userId;

    @Column(name = "`hot`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "热度")
    private Integer hot;

    @Column(name = "`is_edit`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "是否允许编辑默认否")
    private Integer isEdit;

    public void copy(SciCxResult source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
